<?php
include("includes/header.php");
?>
<div id="home">
    <h2>Personal Information:</h2>
    <div class="left">
        <ul>
            <li>Name: Henri Gastman</li>
            <li>Age: 23 years</li>
            <li>Gelacht: man</li>
            <li>Best skill: Woodcutting</li>
        </ul>
        <div id="status">
            <div class="status_bar"><div class="left">Health:</div><div class="middle green" style="width:122px;">83%</div><div class="middle white" style="width:36px;"></div><div class="right"></div></div>
            <div class="status_bar"><div class="left">Energy:</div><div class="middle green" style="width:61px;"></div><div class="middle white"  style="width:97px;">36%</div><div class="right"></div></div>
        </div>
    </div>
    <div class="right">
        <label for="description">Short Description:</label><br />
        <textarea name="description" rows="8" cols="40" >Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent tempor consectetur massa ut aliquam. Phasellus dui velit, sodales sit amet porta ut, tempus euismod velit. A
enean ac ante nibh, nec condimentum augue. Etiam eget massa eu urna facilisis molestie facilisis a ligula. Suspendisse in ligula tellus. Mauris tempus bibendum mattis. Proin vitae euismod odio. </textarea>
    </div>
    
    <h2>Actions:</h2>
    <table id="actions">
        <tr>
            <td width="160px">walking</td>
            <td width="150px">Doreiken Vally</td>
            <td width="150px">Doreiken Forest</td>
            <td width="100px">54%</td>
        </tr>
        <tr>
            <td width="160px">thinking about zagen</td>
            <td width="150px">1h 23m</td>
            <td width="150px">+/- 0h 36m</td>
            <td width="100px">69%</td>
        </tr>
        <tr>
            <td width="160px">making hammer</td>
            <td width="150px">0h 46m</td>
            <td width="150px">0h 0m</td>
            <td width="100px">100%</td>
        </tr>
        <tr>
            <td width="160px">reading book</td>
            <td width="150px">"Fighting with spoons"</td>
            <td width="150px"></td>
            <td width="100px">100%</td>
        </tr>
    </table>
    <h2>Events:</h2>
    <table>
        <tr>
            <td width="150px">12:03 6.05.3456</td>
            <td width="400px">you left Doreiken Vally by foot to Doreiken Forest</td>
        </tr>
        <tr>
            <td width="150px">12.01 6.05.3456</td>
            <td width="400px">Henk says: “Goodbye my friend, hope to speak you soon!”</td>
        </tr>
        <tr>
            <td width="150px">11.45 6.05.3456</td>
            <td width="400px">You see Dirk-Jan entering Doreiken Vallei by bike from Garsion</td>
        </tr>
        <tr>
            <td width="150px">09.29 6.05.3456</td>
            <td width="400px">You see a man taking two bikes</td>
        </tr>
    </table>
</div>

<?
/*
$id = $_SESSION['userid'];
echo "id: " . $id;
$charid = 3;

try {
    $user = $qm->getUserById($id);
    $character = $user->getCharacter($charid);


    if(isset($_GET['edit']) && is_numeric($_GET['edit'])) {
        $editChar = $qm->getCharacterFromIdWithName($_GET['edit'], $character);
        if(isset($_POST['submit'])) {
            $editChar->setName($_POST['name']);
            $qm->setCharacterFromIdWithName($editChar, $character);
        }

        try {

?>
<form method="post" action="">
    Name: <input type="input" name="name" value="<?php echo $editChar->getName(); ?>" />
    <input type="submit" name="submit" value="Save" />
</form>

<?php
        } catch(QueryException $e) {
            print_r($e->getMessage());
        }
    } else {



        echo "<p>Users on the location of " . $character->getName() . ":</p>";
        echo "<ul>";
        foreach($character->getLocation()->getCharacters($character) as $char) {
            echo "<li><a href=\"?edit=".$char->getId()."\">".$char->getName()."</a></li>";
        }
        echo "</ul>";

    }

} catch(QueryException $e) {
    print_r($e->getMessage());
}
*/
?>